The present invention relates to displaying software code, and more particularly, to enhancing the readability of displayed software code.
Computer programs are conventionally written in a high-level language, often in an object-oriented programming language. An object-oriented programming language is a programming language in which programs are created using objects and their interactions to design applications and computer programs. As used with respect to computer systems, the term “object” represents an encapsulated set of data and the method or a group of methods that are performed by a computer system upon that data. An object is an instance of a class. An instance is a named entity that has its own identity and value. An object's identity is the property that uniquely identifies that object, such as a unique object ID number.
A class is a description of a set of entities that share the same attributes, methods, and relationships. Each class has a definition that comprises a data definition and a method definition. Data definitions define the information controlled by the object, and method definitions define the method or methods of such objects.
Objects and classes are created through writing source code. A source code is a human-readable program containing statements written in a high-level language that is not directly readable by a computer. A source code cannot be used by a computer unless it has been compiled. A compiler is a computer program that converts (“compiles”) source code into machine language. The machine code generated is directly executed by the computer's central processing unit.
Many computer programs are written in separate modules, especially when written by a team of developers. Object code modules are linked together to form an executable program.
Software code often contains errors. The process of eliminating errors during software development is commonly known as debugging. Debugging can be quite costly and time consuming, depending on the complexity of the software being developed. Some of these errors are easily detected by visual inspection of the printed code. More subtle errors are typically only discovered with the help of a software debugging tool (“debugger”). A debugger is typically used to trace the execution of executable code for finding programming errors (bugs). Debuggers typically enable a software developer to set a breakpoint near a possibly flawed section of code, run the program normally until the present breakpoint is reached, and then run the program step-by-step (single-stepping) through the possibly flawed section of code to evaluate the cause of the problem.
Software development and debugging is typically performed using an integrated development environment (IDE). An IDE typically comprises a source code editor, a compiler and/or interpreter, build automation tools, and a debugger.
Because many different developers and organizations may be involved in the software development process, software development can be difficult and complex. For example, different portions of the source code of a typical software project may be stored on different computers and in different computer directories. Different software languages may be used to write different portions of the code. It is very important for software developers and support engineers to be able to quickly analyze source code with which they are unfamiliar. Reading and conceptualizing the objects in source code requires a great deal of effort because it requires the reader to translate letters and numbers into a mental representation.
One known solution is for the source code editor or viewer to apply colors, fonts, and styles to the source code using a stylesheet or template system. This could for example make all instance variables a certain color and font, all method names another color and font, and so on. This solution still requires the reader to engage a good portion of his/her mind in reading words and translating those words into mental concepts. Further, this solution applies color, fonts, and styles to types of entities rather than specific entities.
Another known solution is for the IDE such as Symantec's Visual Cafe to provide a visual programming environment where a program can be created from a collection of “widgets” that are arranged graphically in a canvas, and the behaviors of those widgets are defined in properties dialogs. The drawback of this solution is that within this type of view the reader is not examining the objects that are represented by the widgets within the context of the source code itself, so the comments, flow control, and many other types of meaningful information are obscured. It is usually necessary for the reader to toggle back and forth between the visual and source code views to comprehend the source code.